<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改来源基本')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-baseInfo-edit" th:object="${sourceBaseInfo}">
            <input name="id" th:field="*{id}" type="hidden">
            <input name="channelCode" th:field="*{channelCode}" type="hidden">

<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label is-required">渠道编号：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <input name="channelCode" th:field="*{channelCode}" class="form-control" type="text" required>-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label is-required">渠道名称：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <input name="channelName" th:field="*{channelName}" class="form-control" type="text" required>-->
<!--                </div>-->
<!--            </div>-->
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">描述信息：</label>
                <div class="col-sm-8">
                    <input name="descInfo" th:field="*{descInfo}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">价格：</label>
                <div class="col-sm-8">
                    <input name="priceAmount" th:field="*{priceAmount}" class="form-control" type="text" required>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label is-required">溢价率：</label>
                <div class="col-sm-8">
                    <input name="priceRate" th:field="*{priceRate}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">收益分成比例：</label>
                <div class="col-sm-8">
                    <input name="profitRate" th:field="*{profitRate}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">撞库成功最低价：</label>
                <div class="col-sm-8">
                    <input name="checkMinAmount" th:field="*{checkMinAmount}" class="form-control" type="text" required>
                </div>
            </div>

            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">撞库超时时间：</label>
                <div class="col-sm-8">
                    <input name="checkTimeout" th:field="*{checkTimeout}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">进件超时时间：</label>
                <div class="col-sm-8">
                    <input name="registerTimeout" th:field="*{registerTimeout}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">状态：</label>
                <div class="col-sm-8">
                    <select class="form-control" th:field="*{status}" name="status">
                        <option th:each="item:${statusList}" th:value="${item.value}"
                                th:text="${item.name}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">对比价格开关：</label>
                <div class="col-sm-8">
                    <select name="comparePrice" class="form-control m-b" th:with="type=${@dict.getType('sys_yes_no')}" required>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{comparePrice}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">对比价格数量：</label>
                <div class="col-sm-8">
                    <input name="compareNum" th:field="*{compareNum}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">价格百分比：</label>
                <div class="col-sm-8">
                    <input name="priceReductionPercentage" th:field="*{priceReductionPercentage}" class="form-control" type="text" value="0.00" required>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "source/baseInfo";
        $("#form-baseInfo-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-baseInfo-edit').serialize());
            }
        }
    </script>
</body>
</html>